//
//  ArtistViewController.m
//  XMLtoCD08
//
//  Created by Miles on 10-03-24.
//  Copyright 2010 Miles Thorogood
//  greenmeat.net. All rights reserved.
//

#import "ArtistViewController.h"
#import "Artist.h"

@implementation ArtistViewController

@synthesize artist, imageView, textView ;
/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/

- (void)viewDidLoad {
    [super viewDidLoad];
	self.title = artist.lastname;
	/*
	imageView = [[UIImageView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
	imageView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
	imageView.contentMode = UIViewContentModeScaleAspectFit;
	imageView.backgroundColor = [UIColor blackColor];
	*/
	[textView setEditable:NO] ;
	textView.text = [artist text] ;
	imageView.image = [artist.artistImage valueForKey:@"artistImage"];
	//textView.text = [artist.text valueForKey:"text"] ;
	
}

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	self.textView = nil ;
	self.imageView = nil ;
}


- (void)dealloc {
	
	[artist release] ;
	[imageView release] ;
	[textView release] ;
    [super dealloc];
}


@end
